//
//  JGAccountManagementContentView.m
//  JGRider
//
//  Created by 单启志 on 2018/1/31.
//  Copyright © 2018年 ffq. All rights reserved.
//

#import "JGAccountManagementContentView.h"



@interface JGAccountManagementContentView()
@property (weak, nonatomic) IBOutlet UILabel *stayMoneyLab;//待到账
@property (weak, nonatomic) IBOutlet UILabel *totalAssetsLab;//总资产

@property (weak, nonatomic) IBOutlet UILabel *goodCommentLab;//好评数

@property (weak, nonatomic) IBOutlet UILabel *orderCountLab;//接单量

@property (weak, nonatomic) IBOutlet UILabel *badCommentLab;//差评

@property (weak, nonatomic) IBOutlet UIButton *applyWithdrawalsBtn;//申请提现

@end

@implementation JGAccountManagementContentView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        self=[[[NSBundle mainBundle]loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil]lastObject];
        self.frame=frame;
    }
    return self;
}

-(void)awakeFromNib{

    [super awakeFromNib];

}

#pragma mark event response

//返回
- (IBAction)onBackBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(contentViewBackEvent)]) {
        [self.delegate contentViewBackEvent];
    }
}

//结算规则
- (IBAction)onSettlementRulesBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(contentViewSettlementRulesEvent)]) {
        [self.delegate contentViewSettlementRulesEvent];
    }
}
//提现进度
- (IBAction)onProgressBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(contentViewProgressEvent)]) {
        [self.delegate contentViewProgressEvent];
    }
}

//账单
- (IBAction)onAccountBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(contentViewAccountEvent)]) {
        [self.delegate contentViewAccountEvent];
    }
}

//申请提现
- (IBAction)onApplyWithdrawalsBtnClick:(id)sender {
    if ([self.delegate respondsToSelector:@selector(contentViewApplyWithdrawalsEvent)]) {
        [self.delegate contentViewApplyWithdrawalsEvent];
    }
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.applyWithdrawalsBtn.layer.cornerRadius=AdaptedWidth(2);
    self.applyWithdrawalsBtn.layer.masksToBounds=YES;
}

@end
